<template>
  <div class="app">
    <div class="sy-header" >
      <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="backup">
        <template #right>
          <van-icon name="search" size="18" />
        </template>
      </van-nav-bar>
    </div>
    <div class="sy-main" >
      <router-view></router-view>
    </div>
    <div class=" sy-footer">
      <router-view name="sy-tabbar"></router-view>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    backup () {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="scss">
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
figure,
fieldset,
legend,
textarea,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  margin: 0;
}

*, *::before, *::after {
  box-sizing: inherit;
}

// img,
// video {
//   height: auto;
//   max-width: 100%;
// }

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

td:not([align]),
th:not([align]) {
  text-align: left;
}

a {
  text-decoration: none;
  outline: none;
}

html,
body,
.app{
  height: 100%;
}
.app{
  display: flex;
  flex-direction: column;
}
.sy-header, .sy-footer{
  width: 100%;
  height: 50px;
}
.sy-main{
  flex: 1;
  overflow-x: hidden;
  background-color: #f1f2f6;
}
.sy-header .van-nav-bar{
  background-color: rgba(68, 189, 50,1.0);
}
.sy-header .van-nav-bar .van-icon{
  color: white;
}
.sy-header .van-nav-bar__text{
  color: white;
}
</style>
